//
//  BriefTableViewCell.swift
//  甜言蜜语
//
//  Created by yingli_yanfa_liuxingyu on 16/10/25.
//  Copyright © 2016年 wl. All rights reserved.
//

import UIKit
protocol BriefTableViewCellDelegate {
    func changeBrief(text: String)
}
class BriefTableViewCell: UITableViewCell,UITextViewDelegate  {
    @IBOutlet weak var textView: UITextView!
    @IBOutlet weak var textViewPlace: UILabel!
    var delegate:BriefTableViewCellDelegate?
    override func awakeFromNib() {
        super.awakeFromNib()
        self.textView.delegate = self
        // Initialization code
    }

    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

    }
    //MARK:UItextViewdDelegatte
    func textViewDidEndEditing(textView: UITextView){
        
       delegate?.changeBrief(textView.text)
        
    }
    func textViewShouldBeginEditing(textView: UITextView) -> Bool{
        self.textViewPlace.alpha = 0
        return true
    }

    
}
